//
//  SelectedMenuView.m
//  PropertyMananger
//
//  Created by bh on 17/3/1.
//  Copyright © 2017年 BH. All rights reserved.
//

#import "SelectedMenuView.h"

@implementation SelectedMenuView

- (instancetype)initWithFrame:(CGRect)frame{

    self = [super initWithFrame:frame];
    
    if (self) {
        
        self.starImg = [[UIImageView alloc]init];
        [self addSubview:self.starImg];
        self.starImg.image = IMG(@"ico_notes");
        
        [self.starImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self).with.offset(15);
            make.centerY.equalTo(self).offset(0);
            make.size.mas_equalTo(CGSizeMake(10, 10));
        }];
        
        self.titleLabel = [[UILabel alloc]init];
        [self addSubview:self.titleLabel];
        self.titleLabel.font = BHFont(15);
        self.titleLabel.textAlignment = NSTextAlignmentLeft;
        self.titleLabel.textColor = BHColor(102, 102, 102);
        self.titleLabel.text  = @"缴费类型:";
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.starImg.mas_trailing).with.offset(5);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(70, 30));
        }];
        
        
        UIView * lineView = [[UIView alloc]init];
        [self addSubview:lineView];
        lineView.backgroundColor = BHGrayColor;
        
        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.left.equalTo(self).with.offset(15);
            make.bottom.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(BHscreenW - 15, 1));
        }];
        
        self.arrowImg = [[UIImageView alloc]init];
        [self addSubview:self.arrowImg];
        self.arrowImg.image = [UIImage imageNamed:@"ico_work_order_next"];
        
        [self.arrowImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.trailing.equalTo(self).with.offset(-15);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(8, 12));
        }];


    }
    return  self;
}
- (void)pullDownMenuView:(SPullDownMenuView *)menu didSelectedIndex:(NSIndexPath *)indexPath{
    
    NSLog(@"=== %ld",indexPath.section);
    
    // [self.tableView reloadData];
}
@end
